package com.adminserver.mapper;

import com.adminserver.customEntity.UserRolePermissionEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

import com.adminserver.entity.UserRoleEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 * @author huahua
 * @description 针对表【user_role(用户角色关联表)】的数据库操作Mapper
 * @createDate 2022-05-13 13:19:39
 * @Entity com.adminserver.entity.UserRoleEntity
 */
public interface UserRoleMapper extends BaseMapper<UserRoleEntity> {

    List<Map<String, Object>> selectAllUserRole(@Param("userIds") String [] userIds,
                                                @Param("roleIds") String[] roleIds,
                                                @Param("enabled") Boolean enabled);

    /**
     * 查询用户角色
     *
     * @param openid 微信openid
     * @return UserRolePermissionEntity
     */
    List<String> queryUserRoleByUserId(@Param("openid") String openid);
}




